package com.hp.virtual;

/**
 * @author hp
 */
public class VTDemo {

    public static void main(String[] args) throws InterruptedException {

        //平台线程
        Thread.ofPlatform().start(() -> System.out.println(Thread.currentThread()));

        //虚拟线程
        Thread vt = Thread.ofVirtual().start(() -> System.out.println(Thread.currentThread()));
        //等待虚拟线程打印完毕再退出主程序
        vt.join();

    }
}